<template>
  <view class="content">
    <image class="logo" src="/static/logo.png"></image>
    <view class="text-area">
      <text class="title">{{ title }}</text>

      <fui-button type="success" @click="changeTheme">Theme</fui-button>

      <h2>{{ formatDate(new Date()) }}</h2>
      <br>

    </view>
      <fui-button type="danger" @click="toPath">跳转路由</fui-button>
  </view>
</template>

<script setup>
import { ref } from "vue";
import { useThemeStore } from "../../stores";
import { useTimeUtil } from "../../utils";
const {formatDate} = useTimeUtil()
const title = ref("Hello word");
const { changeTheme } = useThemeStore();
const toPath = () => {
  uni.navigateTo({
    url: "/pages/index/testPage",
  });
};
</script>

<style lang="scss" scoped>
.content {
  height: 375rpx;
  width: 750rpx;
  background-color: var(--default-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 200rpx;
  width: 200rpx;
  margin-top: 200rpx;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 50rpx;
}

.text-area {
  display: flex;
  justify-content: center;
}

.title {
  font-size: 36rpx;
  color: #8f8f94;
  color: var(--text-color);
}

</style>
